//
//  UserDBService.m
//  NJUSTHelper
//
//  Created by 郑越辉 on 2017/9/18.
//  Copyright © 2017年 njust. All rights reserved.
//

#import "UserDBService.h"

@implementation UserDBService

+(BOOL)checkUserIsExistWithID:(NSString *)userId{
    return [[DataBase sharedDataBase] checkUserIsExistWithUserId:userId];
}
+(void)logoutAllUser{
    [[DataBase sharedDataBase]logoutAllUser];
}
+(NSInteger) addUser:(UserModel *)user {
    return [[DataBase sharedDataBase]addUser:user];
}
+(NSInteger)updateUser:(UserModel *)user {
    return [[DataBase sharedDataBase]updateUser:user];
}
+(UserModel *)getUserByID:(NSString *)userId {
    return [[DataBase sharedDataBase] selectUserByUserId:userId];
}

+(UserModel *)getLoginUser{
    return [[DataBase sharedDataBase]selectLoginUser];
}
@end
